drawingarea: Fix code snippet
authorTimm Bäder <mail@baedert.org>
Wed, 11 Oct 2017 11:20:15 +0000 (13:20 +0200)
committerTimm Bäder <mail@baedert.org>
Thu, 12 Oct 2017 13:42:03 +0000 (15:42 +0200)
Remove state parameter to gtk_style_context_get_color

gtk/gtkdrawingarea.c

index c36c9838341537e9732cd35dea936f65ab76568e..e3af7b5037dc0b964a3296d026b22678af578555 100644 (file)
@@ -100,19 +100,24 @@ static GParamSpec *props[LAST_PROP] = { NULL, };
  *              0, 2 * G_PI);
  *
  *   gtk_style_context_get_color (context,
- *                                gtk_style_context_get_state (context),
  *                                &color);
  *   gdk_cairo_set_source_rgba (cr, &color);
  *
  *   cairo_fill (cr);
  * }
- * [...]
+ *
+ * void main (int argc, char **argv)
+ * {
+ *   gtk_init ();
+ *
  *   GtkWidget *area = gtk_drawing_area_new ();
  *   gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (area), 100);
  *   gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (area), 100);
  *   gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area),
  *                                   draw_function,
  *                                   NULL, NULL);
+ *
+ * }
  * ]|
  *
  * The draw function is normally called when a drawing area first comes